package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MeowSalesOrderDetailsMapper;
import com.ruoyi.system.domain.MeowSalesOrderDetails;
import com.ruoyi.system.service.IMeowSalesOrderDetailsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-24
 */
@Service
public class MeowSalesOrderDetailsServiceImpl implements IMeowSalesOrderDetailsService 
{
    @Autowired
    private MeowSalesOrderDetailsMapper meowSalesOrderDetailsMapper;

    /**
     * 查询销售订单明细
     * 
     * @param detailId 销售订单明细主键
     * @return 销售订单明细
     */
    @Override
    public MeowSalesOrderDetails selectMeowSalesOrderDetailsByDetailId(String detailId)
    {
        return meowSalesOrderDetailsMapper.selectMeowSalesOrderDetailsByDetailId(detailId);
    }

    /**
     * 查询销售订单明细列表
     * 
     * @param meowSalesOrderDetails 销售订单明细
     * @return 销售订单明细
     */
    @Override
    public List<MeowSalesOrderDetails> selectMeowSalesOrderDetailsList(MeowSalesOrderDetails meowSalesOrderDetails)
    {
        return meowSalesOrderDetailsMapper.selectMeowSalesOrderDetailsList(meowSalesOrderDetails);
    }

    /**
     * 新增销售订单明细
     * 
     * @param meowSalesOrderDetails 销售订单明细
     * @return 结果
     */
    @Override
    public int insertMeowSalesOrderDetails(MeowSalesOrderDetails meowSalesOrderDetails)
    {
        return meowSalesOrderDetailsMapper.insertMeowSalesOrderDetails(meowSalesOrderDetails);
    }

    /**
     * 修改销售订单明细
     * 
     * @param meowSalesOrderDetails 销售订单明细
     * @return 结果
     */
    @Override
    public int updateMeowSalesOrderDetails(MeowSalesOrderDetails meowSalesOrderDetails)
    {
        return meowSalesOrderDetailsMapper.updateMeowSalesOrderDetails(meowSalesOrderDetails);
    }

    /**
     * 批量删除销售订单明细
     * 
     * @param detailIds 需要删除的销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteMeowSalesOrderDetailsByDetailIds(String detailIds)
    {
        return meowSalesOrderDetailsMapper.deleteMeowSalesOrderDetailsByDetailIds(Convert.toStrArray(detailIds));
    }

    /**
     * 删除销售订单明细信息
     * 
     * @param detailId 销售订单明细主键
     * @return 结果
     */
    @Override
    public int deleteMeowSalesOrderDetailsByDetailId(String detailId)
    {
        return meowSalesOrderDetailsMapper.deleteMeowSalesOrderDetailsByDetailId(detailId);
    }
}
